//
//  SubmitSuccessPage_Vc.swift
//  MikerShop
//
//  Created by eme on 2016/12/6.
//  Copyright © 2016年 eme. All rights reserved.
//

import UIKit
import RxSwift
import RickonCore

class SubmitSuccessPage_Vc: UIViewController {
    var disposeBag = DisposeBag()
    @IBOutlet weak var successTitle_Lb: UILabel!
    
    @IBOutlet weak var successDesc_Lb: UILabel!
    @IBOutlet weak var gg_Btn: UIButton!
    
    @IBOutlet weak var jxrz_Btn: UIButton!
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.navigationBar.isHidden = true
    }
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        self.navigationController?.navigationBar.isHidden = false
    }
    
    var spid:String?
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.successTitle_Lb.normal_fontSize(16)
        self.successTitle_Lb.textColor = UIColor(hex: "2c2c2c")
        self.successDesc_Lb.textColor = UIColor(hex: "2c2c2c")
        self.successDesc_Lb.normal_fontSize(16)
        
        self.gg_Btn.setTitleColor(UIColor(hex: "2c2c2c"), for: .normal)
        self.gg_Btn.changeBorderColor(UIColor(hex: "2c2c2c"), cornerRadius: 0, borderWidth: 1)
        self.jxrz_Btn.backgroundColor = UIColor(hex: "2c2c2c")
        self.jxrz_Btn.setTitleColor(UIColor.white, for: .normal)
        
        self.jxrz_Btn
            .rx.tap
            .subscribe(onNext: { ( _ ) in
                ///  跳转到认证资料界面
                _ = "registerdetailinfo".openURL(["spid":self.spid ?? ""])
            })
            .disposed(by: disposeBag)
        
        self.gg_Btn
            .rx.tap
            .subscribe(onNext: { ( _ ) in
                ///  这块需要直接跳转到首页
                self.dismiss(animated: true, completion: nil)
                //                _ = "loginsuccess".openURL()
            })
            .disposed(by: disposeBag)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    /**
     自定义返回上级界面
     */
    func backToView()  {
        _ = self.navigationController?.popViewController(animated: true)
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
